<?php
/* 
* [自定义函数]
* @Author: 			   Recall                 
* @Date:   			   2014-06-26 16:06:56        
* @Last Modified time: 2014-06-26 22:16:58
*/

	/**
	 * [get_cate_url 获得分类地址]
	 * @param  [type] $ishtml  [是否静态]
	 * @param  [type] $htmldir [静态目录]
	 * @param  [type] $cid     [分类cid]
	 * @return [type]          [description]
	 */
	function get_cate_url($ishtml,$htmldir,$cid){
		//判断是否生成静态
		if($ishtml){
			//反出静态路径
			return __ROOT__ . '/' . STATIC_PATH . $htmldir . '/index.html';
		}else{
			//发出动态路径
			return U('List/index',array('cid'=>$cid));
		}
	}

	/**
	 * [get_arc_url 获得文章地址]
	 * @param  [type] $ishtml  [是否静态]
	 * @param  [type] $htmldir [静态目录]
	 * @param  [type] $aid     [文章aid]
	 * @return [type]          [description]
	 */
	function get_arc_url($ishtml,$htmldir,$aid){
		//判断是否生成静态
		if($ishtml){
			//反出静态路径
			return __ROOT__ . '/' . STATIC_PATH . $htmldir . '/arc/' . $aid . '.html';
		}else{
			//发出动态路径
			return U('List/index',array('cid'=>$cid));
		}
	}

?>
